#include <stdlib.h>
#include <stdio.h>
void main()
{
	char* fileName= "idx_S2_10_tree1.txt";
	int i,num;
	FILE* fp;
	fp = fopen(fileName,"r");
	if(!fp){
		printf("\n\n Fatal Error!!!");
		printf("\n\n Failure in reading the file:%s!", fileName);
		printf("\n\n The program does not check the correctness of the tree provided in the file: %s!", fileName);
		return;
	}
	  while (!feof(fp)) {
		 if ( fscanf(fp, "%d %d", &i, &num)!=2){
			  printf("\n For each row, it should has at least two numbers: nodeNum and number of children");
			  return;
		  } 
	  }
	fclose(fp);
}